<%@ page contentType="text/html; charset=utf-8" language="java" errorPage="" %>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<base href="<%=basePath%>"/>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<link href="css/moban.css" type="text/css" rel="stylesheet" media="screen" />
    <link href="css/widget.css" type="text/css" rel="stylesheet" media="screen" />
    <link href="./superAdmin/css/addbtn.css" type="text/css" rel="stylesheet" media="screen" />
<script type="text/javascript">
function showMsg() {
	var msg = '${message}';
	if(msg!=null&&msg!=""){
		alert(msg);
	}
}
</script>
</head>

<body onload="showMsg()">
<div style="background-color:#2E5E79;width:100%;height:50px;position:fixed;top:0;left:0;"></div>
<div id="package">
	<div id="hel">
		<div id="title">
    		<span><img src="./managementOfMember/images/home.png" /> &nbsp;字段列表</span>
    	</div>
    </div>
	<div id="content" style="padding-bottom:50px;">
    	<table class="tab">
    		
			<s:iterator value="#session.stages" var="stage">
				<s:if test="#stage.id == 0">
					<tr>
						<th width="20%">序号</th>
						<th width="35%">完成阶段</th>
						<th width="22%">操作</th>
						<th width="22%" height="25px"><a href="superAdmin/addFields.jsp?stageId=${stage.id}"><input type="submit" name="submit" class="className" style="margin-top:-3px;"value=" 添 加 " /></a></th>
					</tr>
					<s:iterator value="#session.fields" var="field" status="item">
						<s:if test="#stage.id == #field.stage">
							<tr style="height:25px;">
								<td><s:property value="%{#item.getIndex()+1}"/></td>
								<td><s:property value="#field.chinese"/></td>
								<td><a href="showEditField.action?fieldId=${field.id}"><input type="submit" name="submit" class="className" style="margin-top:-3px;" value=" 修改 " /></a></td>
								<td><a onclick="return confirm('确认删除?')"href="deleteField.action?fieldId=${field.id}"><input type="submit" name="submit" class="className" style="margin-top:-3px;" value=" 删除" /></a></td>
							</tr>
						</s:if>
					</s:iterator>  
				</s:if>
				<s:elseif test="#stage.id > 0">
					<tr>	
						<th width="20%">序号</th>
						<th width="35%">第${stage.id}阶段 </th>
						<th width="22%">操作</th>
						<th width="22%" height="25px"><a href="superAdmin/addFields.jsp?stageId=${stage.id}"><input type="submit" name="submit" class="className" style="margin-top:-3px;" value=" 添 加 " /></a></th>
					</tr>
					<s:iterator value="#session.fields" var="field" status="item">
						<s:if test="#field.id != 1 && #field.id != 2 && #field.id != 8 && #field.id != 9">
							<s:if test="#stage.id == #field.stage">
								<tr style="height:25px;">
									<td width="10%"><s:property value="%{#item.getIndex()+1}"/></td>
									<td><s:property value="#field.chinese"/></td>
									<td><a href="showEditField.action?fieldId=${field.id}"><input type="submit" name="submit" class="className" style="margin-top:-3px;" value=" 修改 " /></a></td>
									<td><a onclick="return confirm('确认删除?')" href="deleteField.action?fieldId=${field.id}"><input type="submit" name="submit" class="className" style="margin-top:-3px;" value=" 删除 " /></a></td>
								</tr>
							</s:if>
						</s:if>
					</s:iterator> 
				</s:elseif>
	        </s:iterator>
		</table>
    </div>
</div>
</body>
</html>